package com.wing.sell.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.sell.model.entity.FinishedOrderDetail;
import com.wing.sell.model.response.FinishedOrderDetailExcelVo;
import com.wing.sell.model.response.FinishedOrderDetailVo;
import com.wing.sell.model.response.OrderSkuDetailSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 销售订单表-Dao
 *
 * @author
 */
@Mapper
public interface FinishedOrderDetailDao extends BaseMapper<FinishedOrderDetail> {

    /**
     * 查询成品销售sku信息
     * @param orderId 订单id
     * @param warehouseId 仓库id
     * @return
     */
    List<OrderSkuDetailSearchVo> listByInfo(@Param("orderId") Long orderId, @Param("warehouseId") Long warehouseId);

    /**
     * 查询成品订单信息
     * @param orderId
     * @return
     */
    List<OrderSkuDetailSearchVo> listByInfoBy(@Param("orderId") Long orderId);

    /**
     * 查询成品销售sku信息
     * @param orderId 订单id
     * @param warehouseId 仓库id
     * @return
     */
    List<OrderSkuDetailSearchVo> listByInfoIds(@Param("orderId") Long orderId, @Param("warehouseId") Long warehouseId);


    /**
     * 查询成品销售明细
     * @param pg
     * @param params
     * @return
     */
    List<FinishedOrderDetailVo> pageList4app(@Param("page") Page<FinishedOrderDetailVo> pg,@Param("params") Map<String, Object> params);

    /**
     * 导出excel
     * @param params
     * @return
     */
    List<FinishedOrderDetailExcelVo> exportInProductInfoDetail(@Param("params") Map<String, Object> params);
}
